-- GENERATED SPELL FOR [Surgical Assistant] --


function spell0_16022(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(28310,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16022', 5000, 1)
end

function spell1_16022(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(54339,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16022', 5000, 1)
end

function Sorts_16022(pUnit, Event)
local choix_sorts_16022 = math.random(0, 1)
if choix_sorts_16022 == 0 then
pUnit:RegisterEvent('spell0_16022', 1, 1)
end
if choix_sorts_16022 == 1 then
pUnit:RegisterEvent('spell1_16022', 1, 1)
end
end

function mob16022_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16022', math.random(1500, 3000), 1)
end

function mob16022_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16022_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16022_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16022, 1, 'mob16022_Action')
RegisterUnitEvent(16022, 2, 'mob16022_Leave')
RegisterUnitEvent(16022, 3, 'mob16022_Kill')
RegisterUnitEvent(16022, 4, 'mob16022_Die')
